
<html>
<head>
<meta charset="UTF-8">
<title>表模型DDL脚本</title>
<link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<link href="../../static/css/esaas-easyui-view.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
<style>
pre{ 
	white-space:pre-wrap; /* css3.0 */ 
	white-space:-moz-pre-wrap; /* Firefox */ 
	white-space:-pre-wrap; /* Opera 4-6 */ 
	white-space:-o-pre-wrap; /* Opera 7 */ 
	word-wrap:break-word; /* Internet Explorer 5.5+ */ 
}
</style>
</head>
<body class="easyui-layout">
<form name="ff" id="ff" method="post">
	<div data-options="region:'center',title:''" >
	<form id="ff" >
		<div id="tt" class="easyui-tabs" fit="true" border="false">
			<div title="批量导入内容" style="padding:0px" border="false" fit="true">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">
		    		<tr>
		    			<td>
		    				<textarea name="content" id="content" class="pre" style="overflow-x:hidden;height:310px;width:99.4%;"></textarea>
		    			</td>
		    		</tr>
		    		<tr>
		    			<td>
		    				<table>
		    					<tr>
		    						<input type="hidden" name="objectId" id="objectId"/>
		    						<td>内容分隔符:</td><td><input class="easyui-textbox" type="text" name="split" id="split" data-options="required:true" style="width:60px;height:25px;"/></td>
		    						<td>第一个字段：</td><td><select class="easyui-combobox" id="field1" name="field1" style="width:120px;height:25px" data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BATCH_TABLE_FIELD"></select></td>
		    						<td>第二个字段：</td><td><select class="easyui-combobox" id="field2" name="field2" style="width:120px;height:25px" data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BATCH_TABLE_FIELD"></select></td>
		    						<td>第三个字段：</td><td><select class="easyui-combobox" id="field3" name="field3" style="width:120px;height:25px" data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:BATCH_TABLE_FIELD"></select></td>
		    					</tr>
		    				</table>
		    			</td>
		    		</tr>		    		
	    		</table>
			</div>
		</div>
	</div>
	<div data-options="region:'south',split:false" style="height:60px;">
	    <div style="text-align:center;padding:15px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">&nbsp;确&nbsp;定&nbsp;</a>&nbsp;
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
	    </div>
	</div>
</form>
	<script>
		$(function() {
			var objectId = $.getUrlParam('objectId');
			$("#objectId").attr("value",objectId);
			$("#field1").combobox('select','fieldCode');
			$("#field2").combobox('select','fieldName');
			$("#field3").combobox('select','fieldType');
		});
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPostJson('../../api/field/batch/import', jsonData, function(data) {
				window.parent.reloadList();
			});
		};		
		function closeForm() {
			window.parent.JLEUtil.closewin();

		}
	</script>
</body>
</html>
